package www.ld.com.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import www.ld.com.dictionary.UseStatusEnum;
import www.ld.com.domain.permission.pojo.ResourceRolesPO;
import www.ld.com.domain.roles.pojo.RolesPO;

import java.util.List;

public interface RolesMapper extends BaseMapper<RolesPO> {

    int insertResource(@Param("resources") List<String> resources, @Param("rolesId") Long rolesId);

    int deleteResourceByRolesId(@Param("rolesId") Long rolesId);

    List<ResourceRolesPO> findResourceByRolesId(@Param("rolesId") Long rolesId);

    Boolean existRoles(@Param("rolesId") String rolesId);

    RolesPO selectOneRolesByIdAndStatus(@Param("rolesIds") List<String> rolesIds, @Param("status") UseStatusEnum status);
}
